package com.demo;

public enum EmpStatus {

	LOGIN(100,"登录状态"),LOGOUT(200,"退出状态"),REMOVE(300,"删除状态");
	private Integer code;
	private String msg;
	
	private EmpStatus(Integer code,String msg){
		this.code = code;
		this.msg = msg;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
	public static void main(String[] args) {
		EmpStatus login = EmpStatus.LOGIN;
		System.out.println(login.name());
		System.out.println(login.ordinal());
	}
	
}
